package org.jsola.hr.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.jsola.core.Page;
import org.jsola.core.Result;
import org.jsola.hr.query.SocDispatchQuery;
import org.jsola.hr.vo.*;

import java.util.List;

/**
 * 社保派单记录表
 *
 * @author zhr
 */
@Api(tags = "hr-社保派单记录表")
public interface ISocDispatchControllerAPI {







    /**
     * 删除单个社保派单记录表，彻底删除
     * @param socDispatchId 社保派单记录表id
     * @return 删除数量
     */
    @ApiOperation(value="删除单个社保派单记录表，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "socDispatchId", dataType = "String", value = "社保派单记录表id", paramType = "path")
    })
    Result<Integer> delete(String socDispatchId);


    /**
     * 批量删除社保派单记录表，彻底删除
     * @param socDispatchIds 社保派单记录表id集合
     * @return 删除数量
     */
    @ApiOperation(value = "批量删除社保派单记录表，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "socDispatchIds", dataType = "String[]", value = "社保派单记录表id数组", paramType = "body" ,allowMultiple = true)
    })
    Result<Integer> deleteBatch(String[] socDispatchIds);


    /**
     * 根据社保派单记录表id查询社保派单记录表详情
     * @param socDispatchId 社保派单记录表id
     * @return 社保派单记录表详情
     */
    @ApiOperation(value="根据社保派单记录表id查询社保派单记录表详情")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "socDispatchId", dataType = "String", value = "社保派单记录表id", paramType = "path")
    })
    Result<SocDispatchVO> findById(String socDispatchId);


    /**
     * 查询社保派单记录表
     * @param socDispatchQuery 社保派单记录表查询参数
     * @return page
     */
    @ApiOperation(value="查询社保派单记录表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "socDispatchQuery", dataType = "SocDispatchQuery", value = "社保派单记录表查询参数", paramType = "query")
    })
    Result<List<SocDispatchListVO>> listAll(SocDispatchQuery socDispatchQuery);


     /**
     * 分页查询社保派单记录表
     * @param socDispatchQuery 社保派单记录表查询参数
     * @return page
     */
    @ApiOperation(value="分页查询社保派单记录表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "socDispatchQuery", dataType = "SocDispatchQuery", value = "社保派单记录表查询参数", paramType = "query")
    })
    Result<Page<SocDispatchListVO>> page(SocDispatchQuery socDispatchQuery);

    /**
     * 根据当前月份查询上月社保派单情况
     *
     * @param year  要查询的年
     * @param month 要查询的月
     * @return 上月社保派单情况
     */
    @ApiOperation(value = "根据当前月份查询某用工单位上月社保派单情况")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "companyId", dataType = "String", value = "要查询的用工单位", paramType = "path"),
            @ApiImplicitParam(name = "year", dataType = "String", value = "要查询的年", paramType = "path"),
            @ApiImplicitParam(name = "month", dataType = "String", value = "要查询的月", paramType = "path")
    })
    Result<SocDispatchLastMonthVO> getLastMonthInfo(String companyId, String year, String month);


    /**
     * 根据社保派单记录表id查询社保派单记录表详情及统计数据
     *
     * @param socDispatchId 社保派单记录表id
     * @return 社保派单记录表详情
     */
    @ApiOperation(value = "根据社保派单记录表id查询社保派单记录表详情及统计数据")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "socDispatchId", dataType = "String", value = "社保派单记录表id", paramType = "path")
    })
    Result<SocDetailsDispatchVO> findDetailsById(String socDispatchId);


    /**
     * 社保派单,分配到各个用工单位处理
     *
     * @param socDispatchId 社保派单记录表id
     * @return 社保派单记录表详情
     */
    @ApiOperation(value = "社保派单,分配到各个用工单位处理")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "socDispatchId", dataType = "String", value = "社保派单记录表id", paramType = "path")
    })
    Result<Integer> dispatchSend(String socDispatchId);


    /**
     * 获取当前公司某参保方案可选择的分公司
     *
     * @param socId     参保方案id
     * @param companyId 公司id
     * @return 可选择的分公司
     */
    @ApiOperation(value = "获取当前公司某参保方案可选择的分公司")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "socId", dataType = "String", value = "参保方案id", paramType = "path"),
            @ApiImplicitParam(name = "companyId", dataType = "String", value = "公司id", paramType = "path")
    })
    Result<List<ChildCompanyListVO>> listChildCompanyBySoc(String socId, String companyId);
}

